package com.offcn.sms.controller;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: zola
 * @Date: 2021/9/15 - 09 - 15 - 23:47
 * @Description: com.offcn.sms.controller
 * @Version: 1.0
 */
@RestController
public class SmsController {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    @RequestMapping("/")
    public void sendMessage(){
        Map<String, String> map = new HashMap<>();
        map.put("mobile","17335834094");
        map.put("code","0710");
        rabbitTemplate.convertAndSend("dongyimai.sms.service",map);
    }
}
